<!DOCTYPE html><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta charset="utf-8">
<title>Dimble's Playground » \RDbAuthManager</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner"><div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Dimble's Playground</a><div class="nav-collapse"><ul class="nav">
<li class="dropdown">
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
                                    API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
<li><a>Packages</a></li>
<li><a href="../packages/Auth.html"><i class="icon-folder-open"></i> Auth</a></li>
<li><a href="../packages/Database.html"><i class="icon-folder-open"></i> Database</a></li>
<li><a href="../packages/Default.html"><i class="icon-folder-open"></i> Default</a></li>
<li><a href="../packages/Infraestructure.html"><i class="icon-folder-open"></i> Infraestructure</a></li>
<li><a href="../packages/Rights.html"><i class="icon-folder-open"></i> Rights</a></li>
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
                                    Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
                                    Reports <b class="caret"></b></a><ul class="dropdown-menu">
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
                <span class="label label-info">418</span></a></li>
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
                <ul></ul></a></li>
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
                <span class="label label-info">0</span></a></li>
</ul>
</li>
</ul></div>
</div></div>
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
</div>
<div id="___" class="container">
<noscript><div class="alert alert-warning">
                            Javascript is disabled; several features are only available
                            if Javascript is enabled.
                        </div></noscript>
<div class="row">
<div class="span4">
<div class="btn-toolbar">
<div class="btn-group visibility" data-toggle="buttons-checkbox">
<button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button>
</div>
<div class="btn-group view pull-right" data-toggle="buttons-radio">
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
</div>
</div>
<ul class="side-nav nav nav-list">
<li class="nav-header">
<i title="Methods" class="icon-custom icon-method"></i> Methods
                    <ul>
<li class="method public "><a href="#method_addItemChild" title="addItemChild() :: Adds an item as a child of another item."><span class="description">Adds an item as a child of another item.</span><pre>addItemChild()</pre></a></li>
<li class="method public "><a href="#method_assign" title="assign() :: Assigns an authorization item to a user making sure that
the user doesn't already have this assignment."><span class="description">Assigns an authorization item to a user making sure that
the user doesn't already have this assignment.</span><pre>assign()</pre></a></li>
<li class="method public "><a href="#method_getAssignmentsByItemName" title="getAssignmentsByItemName() :: "><span class="description">getAssignmentsByItemName()
        </span><pre>getAssignmentsByItemName()</pre></a></li>
<li class="method public "><a href="#method_getAuthItem" title="getAuthItem() :: Returns the authorization item with the specified name."><span class="description">Returns the authorization item with the specified name.</span><pre>getAuthItem()</pre></a></li>
<li class="method public "><a href="#method_getAuthItems" title="getAuthItems() :: Returns the authorization items of the specific type and user."><span class="description">Returns the authorization items of the specific type and user.</span><pre>getAuthItems()</pre></a></li>
<li class="method public "><a href="#method_getAuthItemsByNames" title="getAuthItemsByNames() :: Returns the specified authorization items."><span class="description">Returns the specified authorization items.</span><pre>getAuthItemsByNames()</pre></a></li>
<li class="method public "><a href="#method_getItemChildren" title="getItemChildren() :: Returns the children of the specified item."><span class="description">Returns the children of the specified item.</span><pre>getItemChildren()</pre></a></li>
<li class="method public "><a href="#method_updateItemWeight" title="updateItemWeight() :: Updates the authorization items weight."><span class="description">Updates the authorization items weight.</span><pre>updateItemWeight()</pre></a></li>
</ul>
</li>
<li class="nav-header">
<i title="Properties" class="icon-custom icon-property"></i> Properties
                    <ul><li class="property public "><a href="#property_rightsTable" title="$rightsTable() :: "><span class="description">the name of the rights table.</span><pre>$rightsTable</pre></a></li></ul>
</li>
<li class="nav-header private">» Private
                    <ul>
<li class="property private "><a href="#property__itemChildren" title="$_itemChildren() :: "><span class="description"></span><pre>$_itemChildren</pre></a></li>
<li class="property private "><a href="#property__items" title="$_items() :: "><span class="description"></span><pre>$_items</pre></a></li>
</ul>
</li>
</ul>
</div>
<div class="span8">
<a id="\RDbAuthManager"></a><ul class="breadcrumb">
<li>
<a href="../index.html"><i title="Classes" class="icon-custom icon-class"></i></a><span class="divider">\</span>
</li>
<li class="active">
<span class="divider">\</span><a href="../classes/RDbAuthManager.html">RDbAuthManager</a>
</li>
</ul>
<div class="element class">
<p class="short_description">Rights authorization manager class file.</p>
<div class="details">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>author</th>
<td><a href="mailto:cniska@live.com">Christoffer Niska</a></td>
</tr>
<tr>
<th>copyright</th>
<td>Copyright &amp;copy; 2010 Christoffer Niska</td>
</tr>
<tr>
<th>since</th>
<td>0.9.7</td>
</tr>
<tr>
<th>package</th>
<td><a href="../packages/Rights.auth%20manager.html">Rights\auth manager</a></td>
</tr>
</table>
<h3>
<i title="Methods" class="icon-custom icon-method"></i> Methods</h3>
<a id="method_addItemChild"></a><div class="element clickable method public method_addItemChild" data-toggle="collapse" data-target=".method_addItemChild .collapse" title="public">
<h2>Adds an item as a child of another item.</h2>
<pre>addItemChild(string $itemName, string $childName) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description">Overloads the parent method to make sure that
we do not add already existing children.</div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$itemName</h4>
<code>string</code><p>the item name.</p></div>
<div class="subelement argument">
<h4>$childName</h4>
<code>string</code><p>the child item name.</p></div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="CException.html">\CException</a></code></th>
<td>if either parent or child doesn't exist or if a loop has been detected.</td>
</tr></table>
</div></div>
</div>
<a id="method_assign"></a><div class="element clickable method public method_assign" data-toggle="collapse" data-target=".method_assign .collapse" title="public">
<h2>Assigns an authorization item to a user making sure that
the user doesn't already have this assignment.</h2>
<pre>assign(string $itemName, mixed $userId, string $bizRule<code> = null</code>, mixed $data<code> = null</code>) : <a href="CAuthAssignment.html">\CAuthAssignment</a></pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description">Overloads the parent method to make sure that
we do not assign already assigned items.</div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$itemName</h4>
<code>string</code><p>the item name.</p></div>
<div class="subelement argument">
<h4>$userId</h4>
<code>mixed</code><p>the user ID (see {@link IWebUser::getId})</p></div>
<div class="subelement argument">
<h4>$bizRule</h4>
<code>string</code><p>the business rule to be executed when {@link checkAccess} is called
for this particular authorization item.</p></div>
<div class="subelement argument">
<h4>$data</h4>
<code>mixed</code><p>additional data associated with this assignment.</p></div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="CException.html">\CException</a></code></th>
<td>if the item does not exist or if the item has already been assigned to the user.</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code><a href="CAuthAssignment.html">\CAuthAssignment</a></code>the authorization assignment information.</div>
</div></div>
</div>
<a id="method_getAssignmentsByItemName"></a><div class="element clickable method public method_getAssignmentsByItemName" data-toggle="collapse" data-target=".method_getAssignmentsByItemName .collapse" title="public">
<h2>getAssignmentsByItemName()
        </h2>
<pre>getAssignmentsByItemName($name) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$name</h4></div>
</div></div>
</div>
<a id="method_getAuthItem"></a><div class="element clickable method public method_getAuthItem" data-toggle="collapse" data-target=".method_getAuthItem .collapse" title="public">
<h2>Returns the authorization item with the specified name.</h2>
<pre>getAuthItem(string $name, boolean $allowCaching<code> = true</code>) : <a href="CAuthItem.html">\CAuthItem</a></pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description">Overloads the parent method to allow for runtime caching.</div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$name</h4>
<code>string</code><p>the name of the item.</p></div>
<div class="subelement argument">
<h4>$allowCaching</h4>
<code>boolean</code><p>whether to accept cached data.</p></div>
<h3>Returns</h3>
<div class="subelement response">
<code><a href="CAuthItem.html">\CAuthItem</a></code>the authorization item. Null if the item cannot be found.</div>
</div></div>
</div>
<a id="method_getAuthItems"></a><div class="element clickable method public method_getAuthItems" data-toggle="collapse" data-target=".method_getAuthItems .collapse" title="public">
<h2>Returns the authorization items of the specific type and user.</h2>
<pre>getAuthItems(integer $type<code> = null</code>, mixed $userId<code> = null</code>, boolean $sort<code> = true</code>) : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description">Overloads the parent method to allow for sorting.</div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$type</h4>
<code>integer</code><p>the item type (0: operation, 1: task, 2: role). Defaults to null,
meaning returning all items regardless of their type.</p></div>
<div class="subelement argument">
<h4>$userId</h4>
<code>mixed</code><p>the user ID. Defaults to null, meaning returning all items even if
they are not assigned to a user.</p></div>
<div class="subelement argument">
<h4>$sort</h4>
<code>boolean</code><p>whether to sort the items according to their weights.</p></div>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>the authorization items of the specific type.</div>
</div></div>
</div>
<a id="method_getAuthItemsByNames"></a><div class="element clickable method public method_getAuthItemsByNames" data-toggle="collapse" data-target=".method_getAuthItemsByNames .collapse" title="public">
<h2>Returns the specified authorization items.</h2>
<pre>getAuthItemsByNames(array $names, boolean $nested<code> = false</code>) : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$names</h4>
<code>array</code><p>the names of the authorization items to get.</p></div>
<div class="subelement argument">
<h4>$nested</h4>
<code>boolean</code><p>whether to nest the items by type.</p></div>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>the authorization items.</div>
</div></div>
</div>
<a id="method_getItemChildren"></a><div class="element clickable method public method_getItemChildren" data-toggle="collapse" data-target=".method_getItemChildren .collapse" title="public">
<h2>Returns the children of the specified item.</h2>
<pre>getItemChildren(mixed $names, boolean $allowCaching<code> = true</code>) : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description">Overloads the parent method to allow for caching.</div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$names</h4>
<code>mixed</code><p>the parent item name. This can be either a string or an array.
The latter represents a list of item names (available since version 1.0.5).</p></div>
<div class="subelement argument">
<h4>$allowCaching</h4>
<code>boolean</code><p>whether to accept cached data.</p></div>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>all child items of the parent</div>
</div></div>
</div>
<a id="method_updateItemWeight"></a><div class="element clickable method public method_updateItemWeight" data-toggle="collapse" data-target=".method_updateItemWeight .collapse" title="public">
<h2>Updates the authorization items weight.</h2>
<pre>updateItemWeight(array $result) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$result</h4>
<code>array</code><p>the result returned from jui-sortable.</p></div>
</div></div>
</div>
<h3>
<i title="Properties" class="icon-custom icon-property"></i> Properties</h3>
<a id="property_rightsTable"> </a><div class="element clickable property public property_rightsTable" data-toggle="collapse" data-target=".property_rightsTable .collapse" title="public">
<h2>the name of the rights table.</h2>
<pre>$rightsTable : string</pre>
<div class="row collapse"><div class="detail-description">
<h3>Default</h3>
<div class="subelement argument"><code>'Rights'</code></div>
</div></div>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="property__itemChildren"> </a><div class="element clickable property private property__itemChildren" data-toggle="collapse" data-target=".property__itemChildren .collapse" title="private">
<h2>$_itemChildren</h2>
<pre>$_itemChildren </pre>
<div class="row collapse"><div class="detail-description">
<h3>Default</h3>
<div class="subelement argument"><code>array()</code></div>
</div></div>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="property__items"> </a><div class="element clickable property private property__items" data-toggle="collapse" data-target=".property__items .collapse" title="private">
<h2>$_items</h2>
<pre>$_items </pre>
<div class="row collapse"><div class="detail-description">
<h3>Default</h3>
<div class="subelement argument"><code>array()</code></div>
</div></div>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
</div>
</div>
</div>
</div>
<div class="row"><footer class="span12">
            Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
            Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.2.0
</a> and<br>
            generated on 2014-02-03T11:03:56-02:00.<br></footer></div>
</div>
</body>
</html>
